﻿<!DOCTYPE html>
<html>
<head  lang="en">
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<link rel="shortcut icon" href="images/apple.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="css/log.css"/>
<link rel="stylesheet" href="http://apps.bdimg.com/libs/bootstrap/3.3.0/css/bootstrap.min.css">  
<script src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://apps.bdimg.com/libs/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="js/xmlhttp.js"></script>
<title>forget</title>
</head>
<body>
<img id="back" src="../images/50837b9db51f11.jpg"/>
<div class="col-md-5 col-md-offset-3" id="warp">
<div class="panel panel-default" id="adminLog">
   <div class="panel-heading">
      <h1 class="panel-title">
         找回密码
      </h1>
   </div>
   <div class="panel-body">
      <form role="form" id="findform"action="Email.jsp" method="POST">
	  <div class="form-group col-md-12">
	  <label for="nam"class="col-md-4"  style="text-align:left;margin-top:10px;padding-right:10px;">注册邮箱：</label>
	  <div class="col-md-8">
	  <input class="form-control" name="email" id="email" type="text" placeholder="请输入您的邮箱" required/>
	  <input type="hidden" name="newpass" id="newpass" value=""/>
	  </div></div>
	  <div class="form-group col-md-12">
      <div class="col-md-12">
         <button type="submit" id="find" class="col-md-12 btn btn-primary">找回</button>
      </div>
   </div>
	  </form>
   </div>
</div>
</div>
<div id="footer">
    <div class="copyright">Copyright &copy; Rita.&nbsp; All Rights Reserved.</div>
</div>  
<script>
function randomString(len) {
　　len = len || 32;
　　var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';    /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
　　var maxPos = $chars.length;
　　var pwd = '';
　　for (i = 0; i < len; i++) {
　　　　pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
　　}
　　return pwd;
}
var text=randomString(6);
document.getElementById("newpass").value=text;

var flag="<%=request.getParameter("flag")%>";

	if(flag=="1"){alert("邮件已发送至您的邮箱，请注意查收！");}
		if(flag=="2"){alert("该邮箱未注册或邮箱不存在，请重新输入！");}

</script>    
</body>
</html>